
Models = {
    pages: {
        states: {
            "loading-state": "LoadingState",
            "landing-state": "LandingState",
            "menu-state": "MenuState"
        },
        presenter:{
            "loading-state": "LoadingPresenter",
            "landing-state": "LandingPresenter",
            "menu-state": "MenuPresenter"
        },
        "default-state": "loading-state"
    },
    game: {
        gems :{
            map  : {
              x : 8,
              y : 8
            },
            gemsNumber : 64,
            width  : 37,
            height : 37        
        },
        margin: 2
    },
    screen: {
        width: 900,
        height: 800
    },
    defaultMap: [  // for test only
                    [4,3,8,7,9,8,1,9,1,9],
                    [4,8,7,9,5,1,7,8,8,8],
                    [4,2,7,1,6,5,3,1,3,9],
                    [4,5,9,4,0,5,8,2,6,7],
                    [0,3,6,7,9,7,1,5,6,1],
                    [3,8,2,0,2,4,7,8,6,2],
                    [0,0,1,6,6,1,1,2,8,3],
                    [1,1,1,1,4,1,9,3,7,8],
                    [2,7,5,3,1,1,2,7,3,8],
                    [9,2,1,6,1,8,6,4,3,8]
                ],
    gemType: ["paper_fan", "rose", "leaf", "ball", "ball_2", "jar", "scroll", "fish", "hat", "red_jar", "yellow_jar"],
    gemBasePath: "res/gems/",
    resource: {
        fontToLoader: {
            "desyrel": "res/loading-state/desyrel.fnt"
        },
        texture: {
            paper_fan: "res/gems/image_186.png",
            rose: "res/gems/image_188.png",
            leaf: "res/gems/image_190.png",
            jar: "res/gems/image_192.png",
            scroll: "res/gems/image_194.png",
            fish: "res/gems/image_196.png",
            hat: "res/gems/image_198.png",
            red_jar: "res/gems/image_200.png",
            ball: "res/gems/image_202.png",
            ball_2: "res/gems/image_204.png",
            yellow_jar: "res/gems/image_206.png"            
        },
        loading:{
            avatar: "http://nudieme.nudie.com.au/noncompetition/img/img-04.png",
            background_landing: "res/landing-state/background.jpg",
            background_menu: "res/menu-state/Mario-Background.jpg",
            play_button: "res/menu-state/play-button.png",
            connect_button: "res/menu-state/connect-button.png"
        }
    },
    delayTime: {
        switchFromLoadingPage : 3000,
        checkScoreWhenStart : 1000
    },
    animation: {
        swapAnimation: {
            time: 500
        },
        switchPageAnimation: {
            time: 1000
        },
        bounceAnimation:{
            time: 800
        }
    },
    constants: {
    },
    /*
     * using sothink compiler to convert sprite vector flash to
     * SVG html5
     * using sprites.js to run 
     */
     
    effect: {
        disappear: {
            "BackgroundColor": "transparent",
            "FileVersion": "8",
            "FrameCount": "33",
            "FrameHeight": "41",
            "FrameRate": 24.0,
            "FrameWidth": "43",
            "FrameRect": {
                "xmax": 43,
                "xmin": 0,
                "ymax": 41,
                "ymin": 0,
                "HTMLClass": "disappear-effect",
                "parentID": "wrapper-disappear-effect",
                "left": "0",
                "top": "0"
            },
           
            "MainFrame": {
                "type": 39,
                "ShowFrame": [
                    {
                        "depth": 1,
                        "id": "215",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "replace": true,
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 1,
                        "id": "215",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 2,
                        "id": "218",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "replace": true,
                        "type": 26
                    },
                    {
                        "depth": 1,
                        "remove": true,
                        "type": 5
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 2,
                        "id": "218",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 2,
                        "id": "221",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "replace": true,
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 2,
                        "id": "221",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 2,
                        "id": "224",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "replace": true,
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 2,
                        "id": "224",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 2,
                        "id": "227",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "replace": true,
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 2,
                        "id": "227",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 1,
                        "id": "229",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "replace": true,
                        "type": 26
                    },
                    {
                        "depth": 2,
                        "remove": true,
                        "type": 5
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 1,
                        "id": "229",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 1,
                        "id": "231",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "replace": true,
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 1,
                        "id": "231",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 1,
                        "id": "233",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "replace": true,
                        "type": 26
                    },
                    {
                        "type": 1
                    },
                    {
                        "depth": 1,
                        "id": "233",
                        "matrix": "1,0,0,1,0,0",
                        "name": "",
                        "type": 26
                    },
                    {
                        "type": 1
                    }
                ]
            },
            "tags": [
                {
                    "id": 215,
                    "type": 2,
                    "FillStyles": [
                        {
                            "height": 26,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 8, 8)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 26 26",
                            "width": 26,
                            "image": {
                                "height": 26,
                                "width": 26,
                                "xlink:href": ""
                            }
                        }
                    ],
                    "paths": [
                        {
                            "data": "M8,8L34 8L34 34L8 34L8 8",
                            "fill": 0
                        }
                    ]
                },
                {
                    "id": 218,
                    "type": 2,
                    "FillStyles": [
                        {
                            "height": 26,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 8, 8)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 26 26",
                            "width": 26,
                            "image": {
                                "height": 26,
                                "width": 26,
                                "xlink:href": ""
                            }
                        },
                        {
                            "height": 41,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 0, 0)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 43 41",
                            "width": 43,
                            "image": {
                                "height": 41,
                                "width": 43,
                                "xlink:href": ""
                            }
                        }
                    ],
                    "paths": [
                        {
                            "data": "M8,8L34 8L34 34L8 34L8 8",
                            "fill": 0
                        },
                        {
                            "data": "M43,41L0 41L0 0L43 0L43 41",
                            "fill": 1
                        }
                    ]
                },
                {
                    "id": 221,
                    "type": 2,
                    "FillStyles": [
                        {
                            "height": 26,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 8, 8)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 26 26",
                            "width": 26,
                            "image": {
                                "height": 26,
                                "width": 26,
                                "xlink:href": ""
                            }
                        },
                        {
                            "height": 41,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 0, 0)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 43 41",
                            "width": 43,
                            "image": {
                                "height": 41,
                                "width": 43,
                                "xlink:href": ""
                            }
                        }
                    ],
                    "paths": [
                        {
                            "data": "M8,8L34 8L34 34L8 34L8 8",
                            "fill": 0
                        },
                        {
                            "data": "M43,41L0 41L0 0L43 0L43 41",
                            "fill": 1
                        }
                    ]
                },
                {
                    "id": 224,
                    "type": 2,
                    "FillStyles": [
                        {
                            "height": 26,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 8, 8)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 26 26",
                            "width": 26,
                            "image": {
                                "height": 26,
                                "width": 26,
                                "xlink:href": ""
                            }
                        },
                        {
                            "height": 41,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 0, 0)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 43 41",
                            "width": 43,
                            "image": {
                                "height": 41,
                                "width": 43,
                                "xlink:href": ""
                            }
                        }
                    ],
                    "paths": [
                        {
                            "data": "M8,8L34 8L34 34L8 34L8 8",
                            "fill": 0
                        },
                        {
                            "data": "M43,41L0 41L0 0L43 0L43 41",
                            "fill": 1
                        }
                    ]
                },
                {
                    "id": 227,
                    "type": 2,
                    "FillStyles": [
                        {
                            "height": 26,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 8, 8)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 26 26",
                            "width": 26,
                            "image": {
                                "height": 26,
                                "width": 26,
                                "xlink:href": ""
                            }
                        },
                        {
                            "height": 41,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 0, 0)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 43 41",
                            "width": 43,
                            "image": {
                                "height": 41,
                                "width": 43,
                                "xlink:href": ""
                            }
                        }
                    ],
                    "paths": [
                        {
                            "data": "M8,8L34 8L34 34L8 34L8 8",
                            "fill": 0
                        },
                        {
                            "data": "M43,41L0 41L0 0L43 0L43 41",
                            "fill": 1
                        }
                    ]
                },
                {
                    "id": 229,
                    "type": 2,
                    "FillStyles": [
                        {
                            "height": 41,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 0, 0)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 43 41",
                            "width": 43,
                            "image": {
                                "height": 41,
                                "width": 43,
                                "xlink:href": ""
                            }
                        }
                    ],
                    "paths": [
                        {
                            "data": "M43,41L0 41L0 0L43 0L43 41",
                            "fill": 0
                        }
                    ]
                },
                {
                    "id": 231,
                    "type": 2,
                    "FillStyles": [
                        {
                            "height": 41,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 0, 0)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 43 41",
                            "width": 43,
                            "image": {
                                "height": 41,
                                "width": 43,
                                "xlink:href": ""
                            }
                        }
                    ],
                    "paths": [
                        {
                            "data": "M43,41L0 41L0 0L43 0L43 41",
                            "fill": 0
                        }
                    ]
                },
                {
                    "id": 233,
                    "type": 2,
                    "FillStyles": [
                        {
                            "height": 41,
                            "overflow": "visible",
                            "patternTransform": "matrix(1, 0, 0, 1, 0, 0)",
                            "patternUnits": "userSpaceOnUse",
                            "type": 7,
                            "viewBox": "0 0 43 41",
                            "width": 43,
                            "image": {
                                "height": 41,
                                "width": 43,
                                "xlink:href": ""
                            }
                        }
                    ],
                    "paths": [
                        {
                            "data": "M43,41L0 41L0 0L43 0L43 41",
                            "fill": 0
                        }
                    ]
                }
            ]
        }
    }
};